<template>
  <div class="health-management">
    <div class="page-header">
      <h1>健康管理</h1>
      <p class="subtitle">关注您的健康，享受美好生活</p>
    </div>
    
    <div class="dashboard">
      <!-- 健康建议区 -->
      <div class="health-tips">
        <h2>今日健康建议</h2>
        <div class="tip-card">
          <div class="tip-icon">
            <font-awesome-icon icon="sun" />
          </div>
          <div class="tip-content">
            <h4>天气适宜，建议户外运动</h4>
            <p>今日气温适中，非常适合进行15-30分钟的户外散步或太极拳练习。</p>
          </div>
        </div>
      </div>
      <!-- 健康数据概览 -->
      <div class="health-overview">
        <h2>今日健康概览</h2>
        <div class="health-metrics">
          <div class="metric-card">
            <div class="metric-icon">
              <font-awesome-icon icon="heart" />
            </div>
            <div class="metric-data">
              <span class="metric-value">75</span>
              <span class="metric-label">心率 (次/分)</span>
            </div>
          </div>
          <div class="metric-card">
            <div class="metric-icon">
              <font-awesome-icon icon="walking" />
            </div>
            <div class="metric-data">
              <span class="metric-value">6,280</span>
              <span class="metric-label">步数 (步)</span>
            </div>
          </div>
          <div class="metric-card">
            <div class="metric-icon">
              <font-awesome-icon icon="bed" />
            </div>
            <div class="metric-data">
              <span class="metric-value">7.5</span>
              <span class="metric-label">睡眠 (小时)</span>
            </div>
          </div>
        </div>
      </div>

      <!-- 健康管理功能区 -->
      <div class="health-features">
        <div class="feature-card">
          <div class="feature-icon">
            <font-awesome-icon icon="mobile-alt" />
          </div>
          <h3>智能设备数据集成</h3>
          <p>实时同步血压、心率等健康数据，异常指标自动预警</p>
          <button class="feature-btn">查看详情</button>
        </div>

        <div class="feature-card">
          <div class="feature-icon">
            <font-awesome-icon icon="notes-medical" />
          </div>
          <h3>慢性病管理计划</h3>
          <p>智能生成个性化的饮食建议、运动计划和用药提醒</p>
          <button class="feature-btn">开始计划</button>
        </div>

        <div class="feature-card">
          <div class="feature-icon">
            <font-awesome-icon icon="calendar-check" />
          </div>
          <h3>健康档案管理</h3>
          <p>电子化管理体检报告、就医记录等健康档案</p>
          <button class="feature-btn">查看档案</button>
        </div>
      </div>

    </div>
  </div>
</template>

<script>
export default {
  name: 'HealthManagement',
};
</script>

<style scoped>
.health-management {
  padding: 40px;
  background-color: #f8f9fa;
  min-height: 100vh;
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 32px;
  color: #2c3e50;
  margin-bottom: 10px;
}

.subtitle {
  color: #6c757d;
  font-size: 18px;
}

.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 30px;
}

.health-overview {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.health-overview h2 {
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 24px;
}

.health-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.metric-card {
  display: flex;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-5px);
}

.metric-icon {
  width: 50px;
  height: 50px;
  background: #e3f2fd;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  color: #1976d2;
  font-size: 24px;
}

.metric-data {
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-size: 24px;
  font-weight: 600;
  color: #2c3e50;
}

.metric-label {
  font-size: 14px;
  color: #6c757d;
  margin-top: 5px;
}

.health-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background: white;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: #e3f2fd;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #1976d2;
  font-size: 28px;
}

.feature-card h3 {
  color: #2c3e50;
  font-size: 20px;
  margin-bottom: 15px;
}

.feature-card p {
  color: #6c757d;
  margin-bottom: 20px;
  line-height: 1.6;
}

.feature-btn {
  background: #1976d2;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.feature-btn:hover {
  background: #1565c0;
}

.health-tips {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.health-tips h2 {
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 24px;
}

.tip-card {
  display: flex;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.tip-icon {
  width: 50px;
  height: 50px;
  background: #fff3e0;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  color: #f57c00;
  font-size: 24px;
}

.tip-content h4 {
  color: #2c3e50;
  margin-bottom: 5px;
  font-size: 18px;
}

.tip-content p {
  color: #6c757d;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .health-management {
    padding: 20px;
  }

  .health-metrics {
    grid-template-columns: 1fr;
  }

  .health-features {
    grid-template-columns: 1fr;
  }

  .feature-card {
    padding: 20px;
  }
}
</style>